import request from '@/utils/request'

// 首页工作台(管理)上方数据接口
export function GetWorkbenchAPI (params) {
    return request({
        url: '/order/workbench/workbenchManagerData',
        method: 'GET',
        params
    })
}


// 获取列表
export const GetMenuAPI = () => {
    return request({
        url: '/system/menu/getMenu/list',
        method: 'get'
    })
}

// 获取快捷入口列表

export const GetShortcutsAPI = () => {
    return request({
        url: '/system/workbench/list',
        method: 'get'
    })
}

// 提交快捷列表
export const AddShortcutsAPI = data => {
    return request({
        url: '/system/workbench/addOrUpdate',
        method: 'POST',
        data
    })
}

// 公告列表
export const GetNoticeListAPI = params => {
    return request({
        url: '/system/notice/list',
        method: 'GET',
        params
    })
}

// 审核代办分页列表
export const GetAuditListAPI = params => {
    return request({
        url: '/system/audit-agent/list',
        method: 'GET',
        params
    })
}

// 信息提醒分页列表
export const GetMessageAPI = params => {
    return request({
        url: '/system/workbench-message/list',
        method: 'GET',
        params
    })
}

// 审核代办分页列表
export const AllReadAPI = data => {
    return request({
        url: '/system/workbench-message/updateStatus',
        method: 'PUT',
        data
    })
}

// 获取未读消息总数
export const GetNoMessageAPI = data => {
    return request({
        url: '/system/workbench-message/getNoMessage',
        method: 'GET'
    })
}




// 获取前五大客户销售占比(元)
export const GetCustomerSaleRankAPI = params => {
    return request({
        url: '/order/sales-order/customerSaleRank',
        method: 'GET',
        params

    })
}


// 获取前五大供应商采购占比(元)
export const GetSupplierSaleRankAPI = params => {
    return request({
        url: '/order/purchase-order/supplierSaleRank',
        method: 'GET',
        params

    })
}

// 获取首页工作台成品库存金额
export const GetFinishAmountAPI = params => {
    return request({
        url: '/storage/wmsStock/getFinishAmount',
        method: 'GET',
        params
    })
}

// 获取首页工作台原料库存金额
export const GetRawAmountAPI = params => {
    return request({
        url: '/storage/wmsStock/getRawAmount',
        method: 'GET',
        params
    })
}